package io;

import java.io.*;

/**
 * 将fos.txt中的所有字符读取出来
 */
public class Test2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("fos.txt");
        while (true){
            int d = fis.read();
            if (d==-1){
                break;
            }
            System.out.println((char)d);
        }
        int d ;
        while ((d = fis.read())!=-1){
            System.out.println((char)d);
        }
        fis.close();
    }
}
